﻿@page
@model AdminUI.Pages.STATS.SalesDailyModel
@{
    var F = Html.F();
}

@section body {
    <f:Panel ID="Panel1" BodyPadding="5" ShowBorder="false" Layout="VBox" ShowHeader="false" IsViewPort="true">
        <Items>
            <f:Grid ID="Grid1" BoxFlex="1" IsFluid="true" ForceFit="false" ShowBorder="true" ShowHeader="false" EnableTextSelection="true" EnableColumnLines="true" EnableCheckBoxSelect="false" EnableMultiSelect="false" AllowSorting="true" AllowPaging="true" IsDatabasePaging="true"
                    DataIDField="ID" DataTextField="SalesDailyName" OnSort="Grid_DoAction" SortingToolTip="true" SortingCancel="true" OnPageIndexChanged="Grid_DoAction" OnRowCommand="Grid_RowCommand">
                <Toolbars>
                    <f:Toolbar ID="Toolbar1" ToolbarAlign="Right" ItemSpace="1">
                        <Items>
                            <f:DropDownList ID="ddlAgentID" Label="选择代理" LabelWidth="85" SelectedValue="" Width="260" CssClass="margin-r10"></f:DropDownList>
                            <f:DatePicker ID="txtBeginDate" Label="开始日期" LabelWidth="85" DateFormatString="yyyy-MM-dd" Width="230" EnableEdit="false" Required="true" CssClass="margin-r10" SelectedDate="@DateTime.Now.AddMonths(-1).Date"></f:DatePicker>
                            <f:DatePicker ID="txtEndDate" Label="结束日期" LabelWidth="85" DateFormatString="yyyy-MM-dd" Width="230" EnableEdit="false" Required="true" CssClass="margin-r10" SelectedDate="@DateTime.Now.Date"></f:DatePicker>
                            <f:Button ID="btnSubmit" Text="查询" Icon="SystemSearch" OnClick="Grid_DoAction" OnClickFields="Panel1"></f:Button>
                            <f:ToolbarFill ID="ToolbarFill1"></f:ToolbarFill>
                            
                        </Items>
                    </f:Toolbar>
                </Toolbars>
                <Columns>
                    <f:RowNumberField EnablePagingNumber="true" HeaderText="#" TextAlign="Center" Width="60" />
                    <f:RenderField For="List.First().ID" QuickSortField="true" Width="80" TextAlign="Center" Hidden="true" />
                    @* <f:RenderField For="List.First().TID" Width="80" TextAlign="Right" /> *@
                    <f:RenderField For="List.First().SalesDate" Renderer="Date" RendererArgument="yyyy-MM-dd" Width="120" TextAlign="Center" />
                    <f:RenderField For="List.First().AgentID" HeaderText="代理（团队）" Width="220" RendererFunction="renderAgent" />
                    <f:RenderField For="List.First().AgentName" Width="100" Hidden="true" />
                    @* <f:RenderField For="List.First().AreaID" Width="80" TextAlign="Right" /> *@
                    <f:RenderField For="List.First().OrderNum" Width="100" TextAlign="Right" />
                    <f:RenderField For="List.First().Amount" Width="150" TextAlign="Right" />
                    <f:RenderField For="List.First().DividedAmount" Width="150" TextAlign="Right" />
                    @* <f:RenderField For="List.First().DeductionAmount" Width="80" TextAlign="Right" /> *@
                    @* <f:RenderField For="List.First().CreateTime" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm" Width="150" TextAlign="Center" /> *@
                    @* <f:RenderField For="List.First().Memo" MinWidth="100" ExpandUnusedSpace="true" /> *@
                </Columns>
             @*    <Listeners>
                    <f:Listener Event="rowdblclick" Handler="onEditClick"></f:Listener>
                </Listeners> *@
                <PageItems>
                    <f:ToolbarSeparator></f:ToolbarSeparator>
                    <f:ToolbarText Text="每页记录数："></f:ToolbarText>
                    <f:DropDownList ID="ddlGridPageSize" Width="60" DataSource="@(new int[]{10,20,30,50,100,200})" SelectedValue="20" OnSelectedIndexChanged="Grid_DoAction"></f:DropDownList>
                </PageItems>
            </f:Grid>
        </Items>
    </f:Panel>

    <f:Window ID="Window1" IsModal="true" Hidden="true" Target="Top" EnableResize="true" EnableMaximize="true" EnableIFrame="true"
              Width="750" Height="500" OnClose="Grid_DoAction">
    </f:Window>
}

@section script {
    <script src="~/res/js/grid.js"></script>
    <script>
        

    </script>
}